open Castling;;

module CharPG = ParserGenerator (CharToken);;
open CharPG;;

let rec test = lazy !! (
	variant >> tuple
) and variant = lazy !! (
	one_of ~name:"variant" [
		"x", position >> element 'X';
		"y", position_with (element 'Y');
		"z", position_of (element 'Z')]
) and tuple = lazy !! (
	sequence_of (position >> element 'A' >> position_with (element 'B') >> position_of (element 'C'))
);;

pretty_printer := true;;
generate test;;
